package com.dingding.service.user.facade.userlogin;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.dingding.facade.user.facade.userlogin.IUserLoginFacade;
import com.dingding.service.user.core.login.service.IUserLoginService;

@Component("userLoginFacadeV2")
public class UserLoginFacadeImpl implements IUserLoginFacade {

	@Resource(name = "userLoginService")
	private IUserLoginService userLoginService;

	/**
	 * 
	 * 用户注册
	 * 
	 * 此方法只能在系统内部服务间调用
	 * 
	 * @Title: userRegister 
	 * @return boolean true 成功 false 失败
	 * @author CHEHAUNBO
	 * @since V2.3.2
	 * 
	 */
	@Override
	public boolean userRegister(String telPhone) {
		return userLoginService.userRegister(telPhone);
	}

	
	/**
	 * @Description:根据手机号获取用户的登录id
	 * @author fengshuonan
	 * @since 2.3.2
	 */
	@Override
	public String getUserIdByTell(String tellphone){
		return this.userLoginService.getUserIdByNumber(tellphone);
	}

	/**
	 * @Description:同步订单根据发单类型，和发单人的手机号，修改发单人的乘客角色
	 * @param publisherType 发单类型（1:司机发单   2:乘客发单）
	 * @param tellphone 电话号码
	 * @author fengshuonan
	 * @since 2.3.2
	 */
	@Override
	public boolean changeSyncorderPublisherRole(Integer publisherType, String tellphone) {
		return this.userLoginService.changeSyncorderPublisherRole(publisherType, tellphone);
	}
	
}
